<?php
	
	session_start();
	 
	require_once 'controller/MasterController.php';
	require_once 'model/Database.php';
	require_once 'model/DBConfig.php';
	
	//Skapar ny databas.
	$db = new Database();
	$config = new DBConfig();
	$db->Connect($config);
	$instance = new MasterController();
	$body = $instance->DoControll($db);
	//Stänger databasen.
	$db->Close();
	
?>

<!doctype html>
<html lang="sv">
	<head>
		<meta charset="utf-8" />
    	<title>Forum</title>
   		<link rel="stylesheet" href="css/style.css">
   		<link type="text/css" rel="stylesheet" href="css/jquery-te-Style.css" charset="utf-8" />
		<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js" charset="utf-8"></script>
		<script type="text/javascript" src="script/jquery-te-1.0.5.min.js" charset="utf-8"></script>
		<script type="text/javascript" src="script/image-slideshow.js"></script>
  	</head>
	<body>
		<?php
			echo $body;
		?>
	<script> $('textarea').jqte(); </script>
	</body>
</html>